package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/12/29.
 */
public class InviteUserListAction extends AHttpService<PbBean.PbResQuestionInviteUserList> {


    public static InviteUserListAction newInstance(Context context,int questionId , PbBean.PbSignInviteUserListType type , String searchContent , int offset){
        return new InviteUserListAction(context, questionId , type ,searchContent ,offset);
    }

    private int questionId;
    private PbBean.PbSignInviteUserListType type;
    private String searchContent;
    private int offset;
    public InviteUserListAction(Context context, int questionId , PbBean.PbSignInviteUserListType type , String searchContent , int offset) {
        super(context);
        this.questionId = questionId;
        this.type=type;
        this.searchContent=searchContent;
        this.offset=offset;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqQuestionInviteUserList.Builder builder = PbBean.PbReqQuestionInviteUserList.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setQuestionId(questionId);
        builder.setOffset(offset);
        builder.setSearchContent(searchContent);
        builder.setType(type);
        return apiService.quizInviteUserList(builder.build());
    }
}

